//
//  StayBehindPopulationViewController.m
//  Utils
//
//  Created by enghou on 2018/4/27.
//  Copyright © 2018年 xyxorigation. All rights reserved.
//

#import "StayBehindPopulationViewController.h"
#import "StayBehindSearchViewController.h"
#import "StayBehindContainerViewController.h"
@interface StayBehindPopulationViewController ()

@end

@implementation StayBehindPopulationViewController

-(instancetype)init{
    self = [super init];
    if (self) {
        self.path = kGetLeftPeopleList;
    }
    return self;
}

-(void)searchAction{
    StayBehindSearchViewController *search = (StayBehindSearchViewController *)[VCLoader vcWithName:@"StayBehindSearchViewController"];
    search.theDelete = self;
    search.title = @"留守人口查询";
    [self push:search];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    
    // Uncomment the following line to preserve selection between presentations.
    // self.clearsSelectionOnViewWillAppear = NO;
    
    // Uncomment the following line to display an Edit button in the navigation bar for this view controller.
    // self.navigationItem.rightBarButtonItem = self.editButtonItem;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

#pragma mark - Table view data source
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    PopulationItemModel *model = [self.source objectAtIndex:indexPath.row];
    StayBehindContainerViewController *container = [[StayBehindContainerViewController alloc]init];
    container.ids = model.ids;
    container.title = @"留守人口";
    container.theDelete = self;
    [self push:container];
}

@end
